import request from '@/utils/request'

// 查询交货排期审核列表
export function listArrangeCheck(query) {
  return request({
    url: '/marketing/arrangeCheck/list',
    method: 'get',
    params: query
  })
}

// 查询交货排期审核列表
export function getChild(somDjbh) {
  return request({
    url: '/marketing/arrangeCheck/getJhmChild/'+somDjbh,
    method: 'get',
  })
}


// 查询交货排期列表
export function listArrange(query) {
  return request({
    url: '/marketing/arrangeCheck/listMain',
    method: 'get',
    params: query
  })
}


// 查询交货排期审核详细
export function getArrangeCheck(jhmId) {
  return request({
    url: '/marketing/arrangeCheck/' + jhmId,
    method: 'get'
  })
}

// 新增交货排期审核
export function addArrangeCheck(data) {
  return request({
    url: '/marketing/arrangeCheck',
    method: 'post',
    data: data
  })
}

// 新增交货排期维护 和 更新 状态.
export function insJhmUpdSom(data) {
  return request({
    url: '/marketing/arrangeCheck/insJhmUpdSom',
    method: 'post',
    data: data
  })
}
// 修改交货排期审核
export function updateArrangeCheck(data) {
  return request({
    url: '/marketing/arrangeCheck',
    method: 'put',
    data: data
  })
}

// 更新交货排期状态
export function updateJhmztbz(jhmIds,mustZtbz,newZtbz) {
  return request({
    url: '/marketing/arrangeCheck/updateJhmztbz/'+jhmIds + '/' + mustZtbz + '/' + newZtbz,
    method: 'put',
  })
}
// 删除交货排期审核
export function delArrangeCheck(jhmId) {
  return request({
    url: '/marketing/arrangeCheck/' + jhmId,
    method: 'delete'
  })
}

// 导出交货排期审核
export function exportArrangeCheck(query) {
  return request({
    url: '/marketing/arrangeCheck/export',
    method: 'get',
    params: query
  })
}
// 导出交货排期审核
export function exportArrangeCheckFx(query) {
  return request({
    url: '/marketing/arrangeCheck/exportFx',
    method: 'get',
    params: query
  })
}

